{% extends "base.html" %}
{% block content %}

<h2>{% block title %}Log In{% endblock %}</h2>

{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

<form method="post" action="{% url shop.views.auth.login %}">
    {% csrf_token %}
    <div style="display: none">
        <input type="hidden" name="next" value="{{ next }}" />
    </div>
    <ul>
        <li>{{ form.username.label_tag }} {{ form.username }}</li>
        <li>{{ form.password.label_tag }} {{ form.password }}</li>
    </ul>
    <p><input type="submit" value="Log in" /></p>
</form>

<p><a href="{% url shop.views.auth.register %}{% if next %}?next={{ next }}{% endif %}">Register a new account</a></p>

{% endblock %}
